﻿@using Abp.Extensions
@using Abp.Application.Services.Dto
@using MyCompanyName.AbpZeroTemplate.Web.Areas.Mpa.Models.Common.Modals
@using MyCompanyName.AbpZeroTemplate.Web.Areas.Mpa.Models.PersonManage

@model CreateOrEditPersonModalViewModel

@* 初始化头部 *@
@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("EditPerson") + ": " + Model.Person.Name) : L("CreatePerson")))

<!--html代码区域-->
<div class="modal-body">
    <form name="personInformationsForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="Id" value="@Model.Person.Id" />
        <div class="row>
            <div hidden="hidden">
                @if (Model.IsEditMode)
            {
                    <input type="hidden" name="Id" value="@Model.Person.Id" />
                }
            </div>

            <div class="form-group form-md-line-input form-md-floating-label  ">
                <input class="maxlength-handler form-control @(Model.Person.Name.IsNullOrEmpty() ? "" : " edited")" type="text" name="Name" value="@Model.Person.Name" required />
                <label>@L("Name")   <span class="required"> * </span>	 	</label>
            </div>

            <div class="form-group form-md-line-input form-md-floating-label  ">
                <input class="maxlength-handler form-control @(Model.Person.Email.IsNullOrEmpty() ? "" : " edited")" type="text" name="Email" value="@Model.Person.Email" />
                <label>@L("Email") </label>
            </div>

        </div>
    </form>
</div>
@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")

